package com.jcz.web;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

import com.opensymphony.xwork2.ActionSupport;

import net.sf.json.JSONObject;




public class IsExistUserJson extends ActionSupport {
	
	private String name;
	private InputStream info;
	private JSONObject obj;
	
	
	public JSONObject getObj() {
		return obj;
	}
	public void setObj(JSONObject obj) {
		this.obj = obj;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public InputStream getInfo() {
		return info;
	}
	public void setInfo(InputStream info) {
		this.info = info;
	}
	
	public String execute(){
		String message="";
		Map map=new HashMap();
		if("sa".equals(this.getName())){
			message="用户已存在JSON";
		}else{
			message="用户可用JSON";
		}
		
		map.put("msg", message);
		this.setObj(JSONObject.fromObject(map));
		return SUCCESS;
	}
}
